$(function () {
    var setting = {
        data: {
            simpleData: {
                enable: true,
                idKey: "menuId",
                pIdKey: "parentId",
                rootPId: -1
            },
            key: {
                url: "nourl"
            }
        },
        check: {
            enable: true,
            nocheckInherit: true
        }
    };
    var ztree;
    $.get(baseURL + "sys/menu/list", function(r){
        ztree = $.fn.zTree.init($("#ztree"), setting, r);
        //展开所有节点
        ztree.expandAll(false);
    });
})